From: Florian Müllner Date: Fri, 26 Oct 2012 16:52:07 +0000 (+0200) Subject: main: Guard against NULL log_domain in default handler X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4655 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=acffd1e792452ff31fa48cda960555c01d9c9315;p=gnome-shell.git main: Guard against NULL log_domain in default handler g_str_has_prefix() will assert when passed NULL, so we need to make sure that we are passed a non-NULL log_domain first. Spotted by yahoo.com.cn> https://bugzilla.gnome.org/show_bug.cgi?id=663601 --- diff --git a/src/main.c b/src/main.c index 8e805a627..ca2116a96 100644 --- a/src/main.c +++ b/src/main.c @@ -284,7 +284,7 @@ default_log_handler (const char *log_domain, /* Filter out telepathy-glib logs, we don't want to flood Shell's output * with those. */ - if (!g_str_has_prefix (log_domain, "tp-glib")) + if (!log_domain || !g_str_has_prefix (log_domain, "tp-glib")) g_log_default_handler (log_domain, log_level, message, data); }